/// @tags: DP StatusCompress
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
#define rint register int

using std::cin;
using std::cout;

namespace BlueQuantum {

typedef long long LL;

constexpr int MAXN = 209, P = 1e9 + 7;

int n, k, m, lim;

inline int inc(int a, int b) {
  a += b;
  return a >= P ? a - P : a;
}

struct Matrix;

struct Vector {
  static int n;
  int a[MAXN];

  Vector() { memset(a, 0, sizeof(a)); }

  inline int &operator[](int index) { return a[index]; }
  inline const int &operator[](int index) const { return a[index]; }

  Vector operator*(const Matrix &rhs) const;
} ini;

struct Matrix {
  static int n;
  Vector a[MAXN];

  inline Matrix(int x = 0) {
    for (rint i = 0; i < MAXN; ++i) a[i][i] = x;
  }

  inline Vector &operator[](int index) { return a[index]; }
  inline const Vector &operator[](int index) const { return a[index]; }

  Matrix operator*(const Matrix &rhs) const;
  Matrix operator^(int exp) const;
} trans;

int Vector::n, Matrix::n;

inline Vector Vector::operator*(const Matrix &rhs) const {
  Vector res;
  for (rint i = 0; i < n; ++i)
    for (rint j = 0; j < n; ++j) res[i] = inc(res[i], (LL)a[j] * rhs[j][i] % P);
  return res;
}

inline Matrix Matrix::operator*(const Matrix &rhs) const {
  Matrix res;
  for (rint i = 0; i < n; ++i) res[i] = a[i] * rhs;
  return res;
}

inline Matrix Matrix::operator^(int exp) const {
  Matrix res(1), base(*this);
  for (; exp; exp >>= 1, base = base * base)
    if (exp & 1) res = res * base;
  return res;
}

inline void buildTrans() {
  for (rint i = 0; i <= k; ++i) {
    for (rint j = 0; j < lim; ++j) {
      rint cur = i * lim + j;
      if (!(cur & 1)) {
        trans[i * lim + (j >> 1)][cur]++;
        trans[i * lim + (j >> 1) + (lim >> 1)][cur]++;
      }
      if (i == 0) continue;
      if (cur & 1) {
        trans[(i - 1) * lim + (j >> 1)][cur] += __builtin_popcount(j >> 1) + 1;
        trans[(i - 1) * lim + (j >> 1) + (lim >> 1)][cur] +=
            __builtin_popcount((j >> 1) + (lim >> 1)) + 1;
      }
    }
  }
}

inline int main() {
  cin >> n >> k >> m;
  lim = 1 << m;
  Vector::n = Matrix::n = (k + 1) * lim;
  ini[0] = 1;
  buildTrans();
  ini = ini * (trans ^ n);
  int ans = 0;
  for (rint i = k * lim, ilim = (k + 1) * lim; i < ilim; ++i) ans = inc(ans, ini[i]);
  cout << ans;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("CF1152F2 Neko Rules the Catniverse.in", "r", stdin);
  freopen("CF1152F2 Neko Rules the Catniverse.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
